<template>
	<view class="conter" >
		<view v-if="GuildStoreList.length != 0" class="ware_box" v-for="(item, index) in GuildStoreList" :key="index">
			<view style="margin-top: 15rpx; margin-left: 40rpx">
				<u--image width="70rpx" height="70rpx" :src="imgUrl + item.propImg"></u--image>
			</view>
			<view class="jindou">
				<view class="">
					{{ item.propName }}
				</view>
				<view class="">x{{ item.number }}</view>
			</view>
			<view @click="goAwardAllot(item)" class="jiang_box">奖励分配</view>
		</view>
		<view  v-if="GuildStoreList.length == 0">
			<image style="width: 280rpx; height: 280rpx; margin: 275rpx 200rpx 0" src="../../static/images/fighting.gif" mode=""></image>
		</view>
	</view>
</template>

<script>
import config from '@/config.js';
import { getGuildStoreList } from '@/api/union/union.js';
export default {
	data() {
		return {
			imgUrl: config.imgUrl,
			imgUrl: config.gillUrl,
			curPage: 1,
			curPageSize: 10,
			GuildStoreList: [],
			guildId: ''
		};
	},
	onShow() {
		this.getStoreList();
	},
	onLoad(option) {
		this.guildId = option.guildId;
		// console.log(this.guildId, 'id');
	},
	methods: {
		async getStoreList() {
			let param = {};
			param.curPage = this.curPage;
			param.curPageSize = this.curPageSize;
			param.guildId = this.guildId;
			const data = await getGuildStoreList(param);
			console.log(data, 'data');
			this.GuildStoreList = data.data.pageData;
		},
		goAwardAllot(item) {
			uni.navigateTo({
				url: `/pages/tiantuan/reWard?guildId=${this.guildId}&number=${item.number}`
			});
		}
	}
};
</script>

<style scoped lang="less">
page {
	background-color: #1a1a1a;
}
.conter {
	padding: 30rpx 34.88rpx;
	.ware_box {
		width: 157rpx;
		height: 216rpx;
		border-radius: 26rpx;
		border: 2rpx solid #2f2f2f;
		background: linear-gradient(180deg, #1a1a1a 0%, #282828 100%);
		box-shadow: 3rpx 3rpx 5rpx 0rpx rgba(0, 0, 0, 0.15);
		.jindou {
			color: #fff;
			margin-top: 10rpx;
			font-size: 24rpx;
			text-align: center;
		}
		.jiang_box {
			margin: auto;
			display: flex;
			color: #fff;
			width: 100rpx;
			height: 40rpx;
			font-size: 20rpx;
			align-items: center;
			margin-top: 10rpx;
			border-radius: 14rpx;
			justify-content: center;
			background-color: #248ae1;
		}
	}
}
</style>
